package com.smart.model.dtomapper;

import com.smart.model.domain.JiansheUnitDO;
import com.smart.model.request.JiansheUnitAddRequest;
import com.smart.model.request.JiansheUnitRequest;
import com.smart.model.request.JiansheUnitUpdateRequest;
import com.smart.model.vo.JiansheUnitVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface JiansheUnitDtoMapper {

    JiansheUnitDtoMapper INSTANCE = Mappers.getMapper(JiansheUnitDtoMapper.class);

    /**
    * DO to VO
    * @param jiansheUnitDO
    * @return
    */
    JiansheUnitVO do2VO(JiansheUnitDO jiansheUnitDO);

    /**
     * reuest to DO
     * @param request
     * @return
     */
    JiansheUnitDO request2DO(JiansheUnitRequest request);

    /**
     * reuest to DO
     * @param request
     * @return
     */
    JiansheUnitDO request2DO(JiansheUnitAddRequest request);

    /**
     * reuest to DO
     * @param request
     * @return
     */
    JiansheUnitDO request2DO(JiansheUnitUpdateRequest request);
}
